package pl.nazaweb.imedproplus.rest.pojo;

import pl.nazaweb.imedproplus.model.entity.Staff;

public class StaffPojo {

    public Long id;
    public String type;
    public String firstName;
    public String lastName;
    public String pesel;
    public String licenseNumber;
    public String title;
    public String specialization;

    public StaffPojo(Staff staff) {
        this.id = staff.getId();
        this.type = staff.getType();
        this.firstName = staff.getFirstName();
        this.lastName = staff.getLastName();
        this.pesel = staff.getPesel();
        this.licenseNumber = staff.getLicenseNumber();
        this.title = staff.getTitle();
        this.specialization = staff.getSpecialization();
    }

    public StaffPojo() {
    }

    public Staff getEntity() {
        Staff staff = new Staff(id, type, firstName, lastName, pesel, licenseNumber);
        staff.setTitle(title);
        staff.setSpecialization(specialization);
        return staff;
    }
}
